$(document).ready(function() 
{	

		// Check Name
		$("#fullname").blur(function() 
		{ 
			if($(this).val() == '') 
			{
				//Blank or not
				$("#showMsgName").html('<font id="error">Cannot be blank...</font>');
				document.getElementById("submit").setAttribute('disabled', 'disabled'); //Check Fail disible submit button
				return false; 
			}
			else
			{	//Validate special characters
				var Name = $(this).val();
				if(!(/^[A-Za-z]+\ ?[A-Za-z]+$/.test(Name))) 
				{
					$("#showMsgName").html('<font id="error">Just can be [A-Z a-z and _ ] only</font>');
					document.getElementById("submit").setAttribute('disabled', 'disabled'); //Check Fail disible submit button
					return false;
				}
				else
				{
					$("#showMsgName").html("");
					document.getElementById("submit").removeAttribute('disabled'); //Check True enable submit button
					return true;
				}
			}
		});//End Check Name
		
		//Check email
		$("#email").change(function() 
		{ 	
			if($(this).val() == '')
			{
				$("#showMsgEmail").html('<font id="error">Cannot be blank...</font>'); 
				document.getElementById("submit").setAttribute('disabled', 'disabled'); //Check Fail disible submit button
				return false;
			}
			else if(!(/^[A-Za-z0-9\.\-]+\@\w+\.\w+(\.\w+)?$/.test($(this).val())))
			{
				$("#showMsgEmail").html('<font id="error">Invalid email type, try again...!!!</font>');
				document.getElementById("submit").setAttribute('disabled', 'disabled'); //Check Fail disible submit button 
				return false;
			}
			else
			{
				$("#showMsgSubject").html("");
				document.getElementById("submit").removeAttribute('disabled'); //Check True enable submit button
				return true; 
			}
		
		});//End Check email
		
		//Check Subject null
		$("#subject").blur(function() 
		{ 	
			if($(this).val() == '')
			{
				$("#showMsgSubject").html('<font id="error">Cannot be blank...</font>'); 
				document.getElementById("submit").setAttribute('disabled', 'disabled'); //Check Fail disible submit button
				return false;
			}
			else
			{
				$("#showMsgSubject").html(""); 
				document.getElementById("submit").removeAttribute('disabled'); //Check True enable submit button
				return true;
			}
		
		});//End Check Subject null
		
		
		
		
		
		
		
		
});//End ready function



